package pl.edu.uj.ii.battleships.utils;

import pl.edu.ii.uj.battleships.server.ServerHandler;

public class GameDataManager {

	private static GameDataManager instance;
	
	private static String gameName;
	private static String myNick;
	private static String opponentNick;
	private static int boardHeight;
	private static int boardWidth;
	
	private static int twomast;
	private static int threemast;
	private static int fourmast;
	private static int fivemast;
	
	private static ServerHandler serverHandler = null;
	
	private static boolean isServer = false;
	
	public static GameDataManager getInstance() {
		if(instance == null)
			instance = new GameDataManager();

		return instance;
	}


	public static String getGameName() {
		return gameName;
	}


	public static void setGameName(String gname) {
		GameDataManager.gameName = gname;
	}


	public static String getMyNick() {
		return myNick;
	}


	public static void setMyNick(String nick) {
		GameDataManager.myNick = nick;
	}


	public static String getOpponentNick() {
		return opponentNick;
	}


	public static void setOpponentNick(String nick) {
		GameDataManager.opponentNick = nick;
	}


	public static int getBoardHeight() {
		return boardHeight;
	}


	public static void setBoardHeight(int boardHeight) {
		GameDataManager.boardHeight = boardHeight;
	}


	public static int getBoardWidth() {
		return boardWidth;
	}


	public static void setBoardWidth(int boardWidth) {
		GameDataManager.boardWidth = boardWidth;
	}


	public static int getTwomast() {
		return twomast;
	}


	public static void setTwomast(int twomast) {
		GameDataManager.twomast = twomast;
	}


	public static int getThreemast() {
		return threemast;
	}


	public static void setThreemast(int threemast) {
		GameDataManager.threemast = threemast;
	}


	public static int getFourmast() {
		return fourmast;
	}


	public static void setFourmast(int fourmast) {
		GameDataManager.fourmast = fourmast;
	}


	public static int getFivemast() {
		return fivemast;
	}


	public static void setFivemast(int fivemast) {
		GameDataManager.fivemast = fivemast;
	}


	public static ServerHandler getServerHandler() {
		return serverHandler;
	}


	public static void setServerHandler(ServerHandler serverHandler) {
		GameDataManager.serverHandler = serverHandler;
	}


	public static boolean isServer() {
		return isServer;
	}


	public static void setIsServer(boolean isServer) {
		GameDataManager.isServer = isServer;
	}
}
